<tal:block tal:repeat="users  getTriggers/result">
<?php 
	if(count($ctx->users['TriggersRelations'][0]['MyFavorites'])!='')
	{
		$favorite_status = $ctx->users['TriggersRelations'][0]['MyFavorites']['status'];
		
		
	} else {
		$favorite_status = 'Inactive';
		}
?>
<div class="Expr">
<?php if($ctx->users['TriggersRelations'][0]['read_status'] == 0) { $class="act"; } else { $class="nor"; } ?>
<div class="<?php echo $class;?>">
<div class="blkCont">
<p class="UserImg"><img src="/images/TrigIconB.png" alt="Expression" title="Expression"/></p>
<p class="Date"> <?php echo date('M d y',strtotime($ctx->users['added_date']));?></p>
</div>
<div class="blkCont">
<div class="wid240">
<p class="Title"><a href="/triggers/index/triggers-view/1/<?php echo base64_encode($ctx->getTriggers['currentPage']).'/'.base64_encode($ctx->users['id']);?>"><span tal:content="structure php: this.SubStrText(users['message'], 50)">Des Here</span></a></p>

<span><a class="UserShare" id="create" href="javascript:void(0);" onclick="shareTrigger(<?php echo $ctx->users['trigger_id'];?>)">Share</a></span>
</div>
</div>
<div class="blkContRt">
<?php if($favorite_status=="Active"){?>
<a href="javascript:void(0);" onclick="changeStatusFavorite(<?php echo $ctx->users['id'];?>,'Inactive')"><img src="/images/FavorIconAct.png" alt="Favorite" title="Favorite" /></a>
<? } else {?>
<a href="javascript:void(0);" onclick="changeStatusFavorite(<?php echo $ctx->users['id'];?>,'Active')"><img src="/images/FavorIconNor.png" alt="Favorite" title="Favorite" /></a>
<? } ?>
<span><a href="javascript:void(0);" onclick="changeStatustoClose(<?php echo $ctx->users['trigger_id'];?>);"><img src="/images/CloseIcon.png" alt="Close" border="0" class="img_inline" title="Delete"/></a></span>
</div>
<div class="clear"></div>
</div>
</div>

</tal:block>

